#include using namespace std; struct Height { int feet; int inches; }; struct BadGuy { char name[50]; char evilPower[1000]; Height height; }; struct SuperHero { //attributes, members, properties char name[50]; char alias[50]; char power[1000]; char weakness[1000]; int hitPoints; int attackPower; BadGuy nemesis; Height height; //default constructor //takes no arguments SuperHero() { //initialize attributes strcpy(name,"Super"); height.feet = 0; height.inches = 0; hitPoints = 0; } SuperHero(char newName[]) { //initialize attributes strcpy(name, newName); height.feet = 0; height.inches = 0; hitPoints = 0; } //method void get() { cout << "Name: "; cin.getline(name,50); cout << "Alias: "; cin.getline(alias,50); cout << "Power: "; cin.getline(power,50); cout << "Weakness: "; cin.getline(weakness,50); cout << "Initial Hit Points: "; cin >> hitPoints; cout << "Attack Power: "; cin >> attackPower; cout << "Height (feet in): "; cin >> height.feet >> height.inches; //ingore is here to ignore the \n in the input buffer cin.ignore(1); cout << "Nemesis Name: "; cin.getline(nemesis.name,50); } }; void main() { SuperHero s; s.get(); SuperHero s2("Batman"); //strcpy(s.name,"Batman"); //strcpy(s.nemesis.name,"Mr. Freeze"); //s.nemesis.height.feet = 10; //s.nemesis.height.inches = 6; }